********************************************************************************
********************************************************************************
* Title: 		main1
* Project:		Stress, Ethnicity, and Prosocial Behavior
* Author:		Moritz Poll (moritz.poll@brown.edu)
* PIs:			Johannes Haushofer, Sara Lowes, Abednego Musau, David Ndetei, 
*				Nathan Nunn, Moritz Poll, Nancy Qian
* Purpose:		Main specification 1
********************************************************************************
********************************************************************************

$noisyregs dis `"Specification 1; Game: `game'; y: `y'; Fixed effects: `fe'; Restrictions: `if_restriction'; Cluster: `cluster'; in-group: `x'"'

if "`game'" != "cyd" { // Dictator Game, Trust Game and Social Proximity

	$noisyregs reg `y'  _same_`x'##treatment  1._same_sex##treatment  1._same_age##treatment  $controls  `fe'  `if_restriction', `cluster'

}

else { // Choose-Your-Dictator Game

	local v _same_eth  _same_coa07  _same_coa17  _same_sex  _same_age  $cyd_controls
	
	foreach var in `v' {
		capture rename `var' `var'0
		rename cyd_diff`var' `var'
	}
	$noisyregs reg decision  _same_`x'  c._same_`x'#treatment  _same_sex  c._same_sex#treatment  _same_age  c._same_age#treatment  $cyd_controls  `fe'  `if_restriction', `cluster'
	
	foreach var in `v' {
		rename `var' cyd_diff`var'
		capture rename `var'0 `var'
	}

}
